import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/page/Index'
import Login from '@/page/Login'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/sys',
      name: 'Index',
      component: Index,
      redirect: '/sys/module',
      children: [{
        path: '/sys/module',
        name: 'module',
        component: () => import('../page/system_manager/ModuleManager'),
        meta: {
          title: '模块管理'
        }
      },
      {
        path: '/sys/client',
        name: 'client',
        component: () => import('@/page/system_manager/ClientManager'),
        meta: {
          title: '客户管理'
        }
      } ]
    }

  ]
})
